import request from '@/utils/request'

export const sendVerificationCode = (email) => {
  return request({
    url: '/api/auth/forgot-password',
    method: 'post',
    data: { email }
  })
}

export const resetPassword = (data) => {
  return request({
    url: '/api/auth/reset-password',
    method: 'post',
    data
  })
}

export const register = (data) => {
  return request({
    url: '/api/auth/register',
    method: 'post',
    data
  })
}

export const login = (data) => {
  return request({
    url: '/api/auth/login',
    method: 'post',
    data
  })
}

export const checkEmail = (email) => {
  return request({
    url: '/api/auth/check-email',
    method: 'post',
    data: { email }
  })
}
